.class public Lcom/waiqin365/lightapp/im/adapter/bi;
.super Lcom/waiqin365/base/a/a;


# instance fields
.field private b:Ljava/util/List;

.field private c:Ljava/text/SimpleDateFormat;

.field private d:Ljava/text/SimpleDateFormat;

.field private e:Ljava/text/SimpleDateFormat;

.field private f:Ljava/text/SimpleDateFormat;

.field private g:Ljava/text/SimpleDateFormat;

.field private h:Ljava/lang/String;

.field private i:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .locals 3

    invoke-direct {p0, p1}, Lcom/waiqin365/base/a/a;-><init>(Landroid/content/Context;)V

    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string/jumbo v1, "yyyy-MM-dd HH:mm:ss"

    invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->c:Ljava/text/SimpleDateFormat;

    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string/jumbo v1, "MM\u6708dd\u65e5 ahh:mm"

    sget-object v2, Ljava/util/Locale;->CHINA:Ljava/util/Locale;

    invoke-direct {v0, v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->d:Ljava/text/SimpleDateFormat;

    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string/jumbo v1, "MM\u6708dd\u65e5 HH:mm"

    sget-object v2, Ljava/util/Locale;->CHINA:Ljava/util/Locale;

    invoke-direct {v0, v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->e:Ljava/text/SimpleDateFormat;

    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string/jumbo v1, "yyyy\u5e74MM\u6708dd\u65e5 ahh:mm"

    sget-object v2, Ljava/util/Locale;->CHINA:Ljava/util/Locale;

    invoke-direct {v0, v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->f:Ljava/text/SimpleDateFormat;

    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string/jumbo v1, "yyyy\u5e74MM\u6708dd\u65e5 HH:mm"

    sget-object v2, Ljava/util/Locale;->CHINA:Ljava/util/Locale;

    invoke-direct {v0, v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->g:Ljava/text/SimpleDateFormat;

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->i:Landroid/content/Context;

    iput-object p2, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->b:Ljava/util/List;

    invoke-direct {p0, p2}, Lcom/waiqin365/lightapp/im/adapter/bi;->a(Ljava/util/List;)V

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/im/adapter/bi;)Ljava/text/SimpleDateFormat;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->c:Ljava/text/SimpleDateFormat;

    return-object v0
.end method

.method private a(Ljava/util/List;)V
    .locals 1

    if-eqz p1, :cond_0

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/bj;

    invoke-direct {v0, p0}, Lcom/waiqin365/lightapp/im/adapter/bj;-><init>(Lcom/waiqin365/lightapp/im/adapter/bi;)V

    invoke-static {p1, v0}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    :cond_0
    return-void
.end method


# virtual methods
.method public a(ILandroid/view/View;Landroid/view/ViewGroup;Lcom/waiqin365/base/a/b;)Landroid/view/View;
    .locals 10

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/imnotice/g;

    const v1, 0x7f0c0841

    invoke-virtual {p4, p2, v1}, Lcom/waiqin365/base/a/b;->a(Landroid/view/View;I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    const v2, 0x7f0c084b

    invoke-virtual {p4, p2, v2}, Lcom/waiqin365/base/a/b;->a(Landroid/view/View;I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    const v3, 0x7f0c0864

    invoke-virtual {p4, p2, v3}, Lcom/waiqin365/base/a/b;->a(Landroid/view/View;I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/LinearLayout;

    iget-object v4, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->h:Ljava/lang/String;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->a()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_1

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    :goto_0
    const v3, 0x7f0c0867

    invoke-virtual {p4, p2, v3}, Lcom/waiqin365/base/a/b;->a(Landroid/view/View;I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/LinearLayout;

    const v4, 0x7f0c0866

    invoke-virtual {p4, p2, v4}, Lcom/waiqin365/base/a/b;->a(Landroid/view/View;I)Landroid/view/View;

    move-result-object v7

    new-instance v4, Ljava/util/Date;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v8

    invoke-direct {v4, v8, v9}, Ljava/util/Date;-><init>(J)V

    :try_start_0
    iget-object v5, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->c:Ljava/text/SimpleDateFormat;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->k()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;
    :try_end_0
    .catch Ljava/text/ParseException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v4

    :goto_1
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v5

    invoke-virtual {v5, v4}, Ljava/util/Calendar;->setTime(Ljava/util/Date;)V

    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v6

    iget-object v8, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->i:Landroid/content/Context;

    invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v8

    const-string/jumbo v9, "time_12_24"

    invoke-static {v8, v9}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    const/4 v9, 0x1

    invoke-virtual {v5, v9}, Ljava/util/Calendar;->get(I)I

    move-result v5

    const/4 v9, 0x1

    invoke-virtual {v6, v9}, Ljava/util/Calendar;->get(I)I

    move-result v6

    if-eq v5, v6, :cond_3

    const-string/jumbo v5, "24"

    invoke-virtual {v5, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_2

    iget-object v5, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->g:Ljava/text/SimpleDateFormat;

    invoke-virtual {v5, v4}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_2
    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->l()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->l()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_5

    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->l()Ljava/lang/String;

    move-result-object v1

    const-string/jumbo v4, "http://"

    invoke-virtual {v1, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->l()Ljava/lang/String;

    move-result-object v1

    const-string/jumbo v4, "https://"

    invoke-virtual {v1, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->l()Ljava/lang/String;

    move-result-object v1

    const-string/jumbo v4, "www."

    invoke-virtual {v1, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->l()Ljava/lang/String;

    move-result-object v1

    const-string/jumbo v4, "<a "

    invoke-virtual {v1, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_5

    :cond_0
    const/4 v1, 0x1

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setAutoLinkMask(I)V

    :goto_3
    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->m()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_6

    const/16 v0, 0x8

    invoke-virtual {v3, v0}, Landroid/widget/LinearLayout;->setVisibility(I)V

    const/16 v0, 0x8

    invoke-virtual {v7, v0}, Landroid/view/View;->setVisibility(I)V

    :goto_4
    return-object p2

    :cond_1
    const/16 v4, 0x8

    invoke-virtual {v3, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto/16 :goto_0

    :catch_0
    move-exception v5

    :try_start_1
    iget-object v6, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->c:Ljava/text/SimpleDateFormat;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->h()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v8}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;
    :try_end_1
    .catch Ljava/text/ParseException; {:try_start_1 .. :try_end_1} :catch_1

    move-result-object v4

    :goto_5
    invoke-virtual {v5}, Ljava/text/ParseException;->printStackTrace()V

    goto/16 :goto_1

    :catch_1
    move-exception v6

    invoke-virtual {v6}, Ljava/text/ParseException;->printStackTrace()V

    goto :goto_5

    :cond_2
    iget-object v5, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->f:Ljava/text/SimpleDateFormat;

    invoke-virtual {v5, v4}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_2

    :cond_3
    const-string/jumbo v5, "24"

    invoke-virtual {v5, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_4

    iget-object v5, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->e:Ljava/text/SimpleDateFormat;

    invoke-virtual {v5, v4}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_2

    :cond_4
    iget-object v5, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->d:Ljava/text/SimpleDateFormat;

    invoke-virtual {v5, v4}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_2

    :cond_5
    const/4 v1, 0x0

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setAutoLinkMask(I)V

    goto :goto_3

    :cond_6
    const/4 v0, 0x0

    invoke-virtual {v3, v0}, Landroid/widget/LinearLayout;->setVisibility(I)V

    const/4 v0, 0x0

    invoke-virtual {v7, v0}, Landroid/view/View;->setVisibility(I)V

    goto :goto_4
.end method

.method public a(I)Lcom/waiqin365/base/db/imnotice/g;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/imnotice/g;

    return-object v0
.end method

.method public a(Ljava/lang/String;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->h:Ljava/lang/String;

    return-void
.end method

.method public b()I
    .locals 1

    const v0, 0x7f030186

    return v0
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public synthetic getItem(I)Ljava/lang/Object;
    .locals 1

    invoke-virtual {p0, p1}, Lcom/waiqin365/lightapp/im/adapter/bi;->a(I)Lcom/waiqin365/base/db/imnotice/g;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public notifyDataSetChanged()V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/bi;->b:Ljava/util/List;

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/im/adapter/bi;->a(Ljava/util/List;)V

    invoke-super {p0}, Lcom/waiqin365/base/a/a;->notifyDataSetChanged()V

    return-void
.end method
